<br /><br />
<script type="text/javascript" src="http://js.nicedit.com/nicEdit-latest.js"></script> 
<script type="text/javascript">
	bkLib.onDomLoaded(function() { 
				new nicEditor({buttonList : ['bold','italic','underline','strikeThrough','subscript','superscript','justify'
												,'ol'
												,'ul'
												,'subscript'
												,'superscript'
												,'strikethrough'
												,'removeformat'
												,'indent'
												,'outdent'
												,'hr']}).panelInstance('body'); 
				});
</script>
<?php if(isset($this->data)):?>
<form method="post">
    
    <div class="form-group">
        <label for="sectionname">Section Name</label><br>
        
        <select name="sectionname">
            <?php foreach($this->data  as $data):?>
            <option value="<?php echo $data['id'];?>"><?php echo $data['sec_name'];?></option>
            <?php endforeach;?>
        </select>
       
    </div>
     
    <div class="form-group">
        <label for="subject">Subject</label><br>
        <input type="text" name="subject">
    </div>
    <textarea rows="14" cols="70" name="body" id="body" required></textarea><br>
    <input type="submit" class="btn btn-primary btn-md" value="Submit" name="submit" onclick = "nicEditors.findEditor('body').saveContent();">
</form>
<?php else:?>
<h2>Please add section </h2>
<?php endif; ?>

